<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>pc页面调用</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <!--不进行缓存 但是只能清除一次缓存-->
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="content-type" content="no-cache, must-revalidate"/>
    <meta http-equiv="expires" content="0"/>

    <script src="js/jquery-1.11.1.min.js?v=1" type="text/javascript"></script>
    <style>
        *{padding:0;margin:0;}
        .main{width: 600px;height: 700px;margin: 100px auto;}
        #pt{position:relative;width: 600px;height:600px;}
        .btn{width: 70px;height:30px;}
    </style>
</head>
<body>
<div class="main">
    <div id="pt">

    </div>
    <input type="button" value="3x3" class="btn" onclick="fn(3,3)">
    <input type="button" value="4x4" class="btn" onclick="fn(4,4)">
    <input type="button" value="10x10" class="btn" onclick="fn(10,10)">
</div>


<script src="js/index.js" type="text/javascript"></script>

<script>
    function fn(h,l){
        var pt=new ptClass();
        pt.h=h;//行
        pt.l=l;//列
        pt.img="images/bg.jpg";//图片路径
        pt.id="pt";//渲染id
        pt.callFn=callFn;//拼图成功后回调函数
        pt.init();//初始化拼图
    }
    function callFn(){
        setTimeout(function(){alert("拼图成功1");},300);
    }

</script>

</body>
</html>